Skip to content

Commit

Permalink
update readme. use datepicker instead of dateinput
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikmonsen committed Oct 25, 2024
1 parent 5f0fa9c commit 94ba8c7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ For å kjøre lokalt må du sette de nødvendige miljøvariablene:
cp .env.example .env.local
```

| Variabelnavn | Standardverdi | Beskrivelse |
|--------------------------------|---------------|------------------------------|
| NEXT_PUBLIC_BASE_PATH | /ammo | Base path for applikasjonen |
| NEXT_PUBLIC_KEYCLOAK_BASE_URL | _N/A_ | URL til keycloak |
| NEXT_PUBLIC_KEYCLOAK_REALM | _N/A_ | Keycloak-realmen |
| NEXT_PUBLIC_KEYCLOAK_CLIENT_ID | _N/A_ | Keycloak-klienten |
| NEXT_PUBLIC_IMAGE_API_URL | _N/A_ | Sti til bilde-APIet |
| AUTH_API_PATH | _N/A_ | Sti til autentiserings-APIet |
| Variabelnavn | Standardverdi | Beskrivelse |
|--------------------------------|------------------------------|--------------------------------------------------------------------------------------------------------------------------|
| NEXT_PUBLIC_BASE_PATH | /ammo | Base path for applikasjonen |
| NEXT_PUBLIC_KEYCLOAK_BASE_URL | _N/A_ | URL til keycloak |
| NEXT_PUBLIC_KEYCLOAK_REALM | _N/A_ | Keycloak-realmen |
| NEXT_PUBLIC_KEYCLOAK_CLIENT_ID | _N/A_ | Keycloak-klienten |
| NEXT_PUBLIC_IMAGE_API_URL | _N/A_ | Sti til bilde-APIet |
| AUTH_API_PATH | _N/A_ | Sti til autentiserings-APIet |
| CATALOGUE_API_PATH | http://localhost:8087/bikube | Sti til [katalog APIet ](https://github.com/NationalLibraryOfNorway/bikube)<br/>Må starte med `http://` eller `https://` |

Deretter må du kjøre følgende kommandoer:
```bash
Expand Down
4 changes: 2 additions & 2 deletions src/app/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {Key, useEffect, useState} from 'react';
import {approveItem, getItemImage, getItemMetadata} from '@/services/item.data';
import {Spinner} from '@nextui-org/spinner';
import NextImage from 'next/image';
import {CalendarDate, DateInput, Image} from '@nextui-org/react';
import {CalendarDate, DatePicker, Image} from '@nextui-org/react';
import {Controller, SubmitHandler, useForm} from 'react-hook-form';
import {Input} from '@nextui-org/input';
import {Button} from '@nextui-org/button';
Expand Down Expand Up @@ -196,7 +196,7 @@ export default function Page({params}: { params: { id: string } }) {
}}
defaultValue={dateValue(new Date(extractedMetadata.date))}
render={({field}) => (
<DateInput
<DatePicker
{...field}
value={field.value}
onChange={e => field.onChange(e)}
Expand Down

0 comments on commit 94ba8c7

Please sign in to comment.