-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: frontend repository structure + example api requests not using …
…context
- Loading branch information
Showing
6 changed files
with
8 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SERVER_ENDPOINT=https://api.hungermapdata.org/v2 | ||
API_URL=https://api.hungermapdata.org/v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SERVER_ENDPOINT=https://api.hungermapdata.org/v2 | ||
API_URL=https://api.hungermapdata.org/v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,12 @@ | ||
import { Suspense } from 'react'; | ||
import { Chart } from '@/components/Charts/Chart'; | ||
import container from '@/container'; | ||
import CountryRepository from '@/domain/repositories/CountryRepository'; | ||
|
||
import { ClientChart } from '@/components/Charts/ClientChart'; | ||
|
||
import Providers from './providers'; | ||
/** | ||
* You can use this page to try and show off your components. | ||
* It's not accessible from the UI, but you can reach it by manually navigating to /elements | ||
*/ | ||
|
||
export default function Elements() { | ||
return ( | ||
<Suspense fallback={<div className="w-full h-full flex justify-center items-center">Loading...</div>}> | ||
<Providers> | ||
<ClientChart /> | ||
</Providers> | ||
</Suspense> | ||
); | ||
export default async function Elements() { | ||
const countryData = await container.resolve<CountryRepository>('CountryRepository').getCountryData(50); | ||
return <Chart data={countryData.fcsGraph} />; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.