Skip to content

Commit

Permalink
Refactor state => atom for live design updates
Browse files Browse the repository at this point in the history
  • Loading branch information
turbo124 committed Nov 29, 2023
1 parent c67cc1b commit 43be708
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pages/settings/invoice-design/common/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function useHandleSettingsValueChange() {

if(designs.includes(property as string)) {

let design = property.replace('_design_id', '');
const design = property.replace('_design_id', '');

setPayload((current) => current && { ...current,
entity_type: design,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

import { Settings } from '$app/common/interfaces/company.interface';
import { useEffect, useState } from 'react';
import { useEffect } from 'react';
import { ClientDetails } from './components/ClientDetails';
import { CompanyAddress } from './components/CompanyAddress';
import { CompanyDetails } from './components/CompanyDetails';
Expand All @@ -34,7 +34,6 @@ import { liveDesignAtom } from '../../common/atoms';
import { request } from '$app/common/helpers/request';
import axios, { AxiosPromise } from 'axios';
import { useCurrentSettingsLevel } from '$app/common/hooks/useCurrentSettingsLevel';
import { current } from '@reduxjs/toolkit';

export interface GeneralSettingsPayload {
client_id: string;
Expand Down

0 comments on commit 43be708

Please sign in to comment.