Skip to content

Commit

Permalink
app context issue
Browse files Browse the repository at this point in the history
  • Loading branch information
clefayomide committed Feb 27, 2023
1 parent 4e4cd66 commit 2ac498c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
42 changes: 21 additions & 21 deletions src/component/Converter/Converter.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useContext, useState } from 'react';
// import { AppState } from '../../context/AppState';
import { AppState } from '../../context/AppState';
import { Currency } from '../Currency';
import Button from '../form/Button';
import AppContext from '../../context/app_context';
Expand Down Expand Up @@ -46,25 +46,25 @@ export const Converter = () => {
};

return (
// <AppState>
<div className="w-fit">
<Currency
title={'You send'}
value={send}
on_change={set_send}
read_only={false}
type={'text'}
/>
<div className="h h-10 border-l-2 border-dotted ml-6 bg-slate-800 w-fit"></div>
<Currency
title={'You receive'}
read_only={true}
value={state.receiving_amount.toString()}
type={'text'}
on_change={set_receive}
/>
<Button title={'Convert'} on_click={handle_conversion} />
</div>
// </AppState>
<AppState>
<div className="w-fit">
<Currency
title={'You send'}
value={send}
on_change={set_send}
read_only={false}
type={'text'}
/>
<div className="h h-10 border-l-2 border-dotted ml-6 bg-slate-800 w-fit"></div>
<Currency
title={'You receive'}
read_only={true}
value={state.receiving_amount.toString()}
type={'text'}
on_change={set_receive}
/>
<Button title={'Convert'} on_click={handle_conversion} />
</div>
</AppState>
);
};
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './';
export * from "./component/Converter/Converter"

0 comments on commit 2ac498c

Please sign in to comment.