Skip to content

Commit

Permalink
add initial set up for react
Browse files Browse the repository at this point in the history
  • Loading branch information
Frost authored and Frost committed Sep 7, 2024
1 parent dea2558 commit 6b77f00
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { BrowserRouter, Route, Routes } from "react-router-dom";
import CountryInfoApp from "./components/countryInfoApp";
import CountryList from "./components/countryList"
import CountryDetails from "./components/countryDetails";

function App() {
return (
<>
<BrowserRouter>
<Routes>
<Route path="/" element={<CountryInfoApp />}>
<Route index element={<CountryList />} />
<Route path="country/:countryName" element={<CountryDetails />}/>
</Route>
</Routes>
</BrowserRouter>
</>
);
}
export default App;
11 changes: 11 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap");

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
body {
@apply bg-lightBackground dark:bg-darkPrimary font-mainFont
}
}
10 changes: 10 additions & 0 deletions src/main.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import App from './App.jsx'
import './index.css'

createRoot(document.getElementById('root')).render(
<StrictMode>
<App />
</StrictMode>,
)

0 comments on commit 6b77f00

Please sign in to comment.