create-bluecopa-react-app 1.0.12 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ import { Label } from "~/components/ui/label";
8
8
  import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "~/components/ui/card";
9
9
  import { Separator } from "~/components/ui/separator";
10
10
  import { Badge } from "~/components/ui/badge";
11
- import { copaUtils, copaSetConfig, copaGetConfig } from "@bluecopa/react";
11
+ import { copaUtils, copaGetConfig } from "@bluecopa/react";
12
12
 
13
13
  interface WebSocketEvent {
14
14
  id: string;
@@ -40,7 +40,6 @@ export default function WebsocketTestPage() {
40
40
  try {
41
41
  // Get current config to use access token and userId
42
42
  const config = copaGetConfig();
43
- console.log("config", config);
44
43
 
45
44
  if (!config.accessToken || !config.userId) {
46
45
  addEvent("system", "error", {
@@ -53,7 +52,9 @@ export default function WebsocketTestPage() {
53
52
  wsProviderRef.current = copaUtils.websocketUtils.WebsocketContextFactory.create(
54
53
  "centrifugo",
55
54
  {
56
- connectionUrl: connectionUrl || undefined
55
+ connectionUrl: connectionUrl,
56
+ token: config.accessToken,
57
+ userId: config.userId
57
58
  }
58
59
  );
59
60
 
@@ -406,7 +407,7 @@ export default function WebsocketTestPage() {
406
407
  <div className="space-y-2">
407
408
  <h4 className="font-semibold">Before Using:</h4>
408
409
  <pre className="text-xs bg-muted p-3 rounded overflow-x-auto">
409
- {`import { copaSetConfig } from "@bluecopa/core";
410
+ {`import { copaSetConfig } from "@bluecopa/react";
410
411
 
411
412
  // Set configuration before connecting
412
413
  copaSetConfig({
@@ -1,17 +1,14 @@
1
1
  import { Routes, Route, Navigate } from "react-router-dom";
2
- import { lazy } from "react";
3
2
  import "./app.css";
4
-
5
- const Home = lazy(() => import('~/routes/home'))
6
- const Comments = lazy(() => import('~/routes/comments'))
7
- const Websocket = lazy(() => import('~/routes/websocket'))
8
- const Payments = lazy(() => import('~/routes/payments'))
9
-
3
+ import Dashboard from "./routes/dashboard";
4
+ import Comments from "./routes/comments";
5
+ import Websocket from "./routes/websocket";
6
+ import Payments from "./routes/payments";
10
7
 
11
8
  export default function RouteConfig() {
12
9
  return (
13
10
  <Routes>
14
- <Route path="/" element={<Home />} />
11
+ <Route path="/" element={<Dashboard />} />
15
12
  <Route path="/comments" element={<Comments />} />
16
13
  <Route path="/websocket" element={<Websocket />} />
17
14
  <Route path="/payments" element={<Payments />} />
@@ -19,7 +19,6 @@
19
19
  "hooks": "~/hooks"
20
20
  },
21
21
  "registries": {
22
- "@shadcn": "https://ui.shadcn.com/r/index.json",
23
- "@bluecopa-ui": "https://shadcn-ui-henna.vercel.app/r/registry.json"
22
+ "@bluecopa-ui": "https://shadcn-ui-henna.vercel.app/r/{name}.json"
24
23
  }
25
24
  }
@@ -1,13 +1,12 @@
1
- System.register(['./__federation_fn_import-CzfA7kmP.js', './index-D5og7-RT-BA7DwZw1.js', './client-LFBsfOjG.js'], (function (exports, module) {
1
+ System.register(['./__federation_fn_import-CzfA7kmP.js', './client-CsvW46cT.js'], (function (exports, module) {
2
2
  'use strict';
3
- var importShared, jsxRuntimeExports, clientExports, MemoryRouter, BrowserRouter, App;
3
+ var importShared, clientExports, jsxRuntimeExports, MemoryRouter, BrowserRouter, App;
4
4
  return {
5
5
  setters: [module => {
6
6
  importShared = module.importShared;
7
- }, module => {
8
- jsxRuntimeExports = module.j;
9
7
  }, module => {
10
8
  clientExports = module.c;
9
+ jsxRuntimeExports = module.j;
11
10
  MemoryRouter = module.M;
12
11
  BrowserRouter = module.B;
13
12
  App = module.A;