Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cra-template-demplate

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cra-template-demplate - npm Package Compare versions

Comparing version 0.0.4 to 0.0.8

2

package.json
{
"name": "cra-template-demplate",
"version": "0.0.4",
"version": "0.0.8",
"keywords": [

@@ -5,0 +5,0 @@ "react",

import create from 'zustand';
import enWords from '@/assets/translates/en.json'
import arWords from '@/assets/translates/ar.json'

@@ -11,7 +9,5 @@ export enum Locale {

const defaultLocale = Locale.EN;
const defaultMessages = enWords;
interface Store {
locale: Locale;
messages: Record<string, any>;
setLocale: (locale: Locale) => void;

@@ -22,16 +18,3 @@ }

locale: defaultLocale,
messages: defaultMessages,
setLocale: (locale: Locale) => {
let messages = {};
switch (locale) {
case Locale.AR:
messages = arWords;
break
default:
case Locale.EN:
messages = enWords;
break;
}
set(state => ({locale, messages}))
}
setLocale: (locale: Locale) => set(state => ({locale}))
}));

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc