π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
feat: better performance for timezone
Nevo Davidd5979ed6c8db
diff --git a/apps/frontend/src/components/layout/set.timezone.tsx b/apps/frontend/src/components/layout/set.timezone.tsxindex e0a3a6043..1835b96ed 100644--- a/apps/frontend/src/components/layout/set.timezone.tsx+++ b/apps/frontend/src/components/layout/set.timezone.tsx@@ -21,18 +21,16 @@ export const newDayjs = (config?: ConfigType) => {const SetTimezone: FC = () => {useEffect(() => {- dayjs.utc = new Proxy(originalUtc, {- apply(target, thisArg, args) {- const result = target.apply(thisArg, args);+ dayjs.utc = (config?: ConfigType, format?: string, strict?: boolean) => {+ const result = originalUtc(config, format, strict);- // Attach `.local()` method to the returned Dayjs object- result.local = function () {- return result.tz(getTimezone());- };+ // Attach `.local()` method to the returned Dayjs object+ result.local = function () {+ return result.tz(getTimezone());+ };- return result;- },- });+ return result;+ };if (localStorage.getItem('timezone')) {dayjs.tz.setDefault(getTimezone());}