1
- import { Alert , Button , VStack } from '@navikt/ds-react' ;
2
- import { useState } from 'react' ;
3
1
import RowLayout from '../components/layout/RowLayout' ;
4
- import SidebarLayout from '../components/layout/SidebarLayout' ;
5
- import UserFeedback from '../components/UserFeedback' ;
6
- import useMottaksadresser from '../hooks/useMottaksadresser' ;
7
- import MottaksadresseTable from './MottaksadresseTable' ;
8
2
9
3
const MottaksadresserListe = ( ) => {
10
- const { mottaksadresser, ready, errorMessage, publishMottaksadresser } = useMottaksadresser ( ) ;
4
+ // const { mottaksadresser, ready, errorMessage, publishMottaksadresser } = useMottaksadresser();
11
5
// const [editAddressId, setEditAddressId] = useState<string | undefined>(undefined);
12
6
// const [loadingForm, setLoadingForm] = useState<boolean>(false);
13
- const [ publishing , setPublishing ] = useState < boolean > ( false ) ;
7
+ // const [publishing, setPublishing] = useState<boolean>(false);
14
8
15
9
// const onSubmitDone = () => {
16
10
// setEditAddressId(undefined);
@@ -26,32 +20,32 @@ const MottaksadresserListe = () => {
26
20
// setEditAddressId(undefined);
27
21
// };
28
22
29
- const onPublish = ( ) => {
30
- setPublishing ( true ) ;
31
- publishMottaksadresser ( ) . finally ( ( ) => setPublishing ( false ) ) ;
32
- } ;
23
+ // const onPublish = () => {
24
+ // setPublishing(true);
25
+ // publishMottaksadresser().finally(() => setPublishing(false));
26
+ // };
33
27
34
28
return (
35
29
< RowLayout
36
- right = {
30
+ /* right={
37
31
<SidebarLayout noScroll={true}>
38
32
<VStack gap="1">
39
33
<Button onClick={onPublish} loading={publishing} size="small">
40
34
Publiser mottaksadresser
41
35
</Button>
42
- { /*<Button variant="secondary" onClick={() => editMottaksadresse('new')} type="button" size="small">*/ }
43
- { /* Legg til ny*/ }
44
- { /*</Button>*/ }
36
+ {/! *<Button variant="secondary" onClick={() => editMottaksadresse('new')} type="button" size="small">*! /}
37
+ {/! * Legg til ny*! /}
38
+ {/! *</Button>*! /}
45
39
<UserFeedback />
46
40
</VStack>
47
41
</SidebarLayout>
48
- }
42
+ }*/
49
43
>
50
44
< div >
51
- { ! ready && 'Laster mottaksadresser...' }
52
- { errorMessage && < Alert variant = "error" > { errorMessage } </ Alert > }
45
+ { /*{ !ready && 'Laster mottaksadresser...'}*/ }
46
+ { /*{ errorMessage && <Alert variant="error">{errorMessage}</Alert> }*/ }
53
47
54
- < MottaksadresseTable mottaksadresser = { mottaksadresser } />
48
+ { /*<RecipientTable recipients ={mottaksadresser} />*/ }
55
49
{ /*{editAddressId === 'new' && (*/ }
56
50
{ /* <MottaksadresseEditor*/ }
57
51
{ /* onSubmitDone={onSubmitDone}*/ }
0 commit comments