flowchart TD
A[main.tsx] --> B[SuiClientProvider + WalletProvider + BrowserRouter]
B --> C[App]
C --> D{useCurrentAccount}
D -- not connected --> E[Landing + NotConnected]
D -- connected --> F[Routes]
F --> G[Dashboard]
F --> H[MemberRegistration]
F --> I[Attendance]
F --> J[TermTransition]
subgraph Shared Hooks
K[useBlockblockIds\n(localStorage defaults)] --> L[useBlockblockObjects\n(getObject registry/club)]
L --> M[useRoles\n(president/vice/treasurer/member)]
N[useBlockblockTx\n(executeTx + toast)]
end
G --> K
G --> L
G --> M
G --> N
H --> K
H --> L
H --> M
H --> N
I --> K
I --> L
I --> M
I --> N
J --> K
J --> L
J --> M
J --> N
subgraph Actions
A1[Button Click] --> A2[createBlockblockTx]
A2 --> A3[moveCall(s)]
A3 --> A4[executeTx]
A4 --> A5[toast: loading/success/error]
A4 --> A6[onSuccess -> updateId/local state]
end
G --> A1
H --> A1
I --> A1
J --> A1
[main.tsx]
|
v
[SuiClientProvider + WalletProvider + Router]
|
v
[App]
|
+-- if NOT connected -> [Landing + NotConnected]
|
+-- if connected -----+
|
v
[Routes]
|
+--> [Dashboard]
| |
| +--> useBlockblockIds (localStorage)
| +--> useBlockblockObjects (registry/club)
| +--> useRoles (president/vice/treasurer/member)
| +--> useBlockblockTx (executeTx + toast)
|
+--> [MemberRegistration] (same hooks)
+--> [Attendance] (same hooks + attendance getObject)
+--> [TermTransition] (same hooks + transition getObject)
Action Flow (all pages)
[Button Click]
-> createBlockblockTx
-> moveCall(...)
-> executeTx
-> toast loading/success/error
-> onSuccess: updateId / local state