@@ -60,6 +60,26 @@ const ToggleButton = styled.button`
60
60
}
61
61
` ;
62
62
63
+ const CodePanel = styled . div `
64
+ background: ${ bankerPanel } ;
65
+ border: 1px solid ${ bankerAccent } ;
66
+ border-radius: 8px;
67
+ padding: 20px;
68
+ color: ${ bankerText } ;
69
+ font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
70
+ font-size: 0.98rem;
71
+ white-space: pre-wrap;
72
+ margin-top: 32px;
73
+ margin-bottom: 32px;
74
+ overflow-x: auto;
75
+ ` ;
76
+
77
+ const CodeTitle = styled . div `
78
+ font-weight: bold;
79
+ color: ${ bankerAccent } ;
80
+ margin-bottom: 12px;
81
+ ` ;
82
+
63
83
const APIs = ( ) => {
64
84
const [ isCollapsed , setIsCollapsed ] = useState ( true ) ;
65
85
const [ accountData , setAccountData ] = useState ( [ ] ) ;
@@ -168,6 +188,32 @@ const APIs = () => {
168
188
) }
169
189
</ SidePanel >
170
190
191
+ { /* Code Panel for API Examples */ }
192
+ < CodePanel >
193
+ < CodeTitle > ORDS REST API Example</ CodeTitle >
194
+ < code >
195
+ { `// Get all accounts (GET)
196
+ GET https://ij1tyzir3wpwlpe-financialdb.adb.eu-frankfurt-1.oraclecloudapps.com/ords/financial/accounts/
197
+
198
+ // Get a single account (GET)
199
+ GET https://ij1tyzir3wpwlpe-financialdb.adb.eu-frankfurt-1.oraclecloudapps.com/ords/financial/accounts/{account_id}
200
+
201
+ // Create an account (POST)
202
+ POST https://ij1tyzir3wpwlpe-financialdb.adb.eu-frankfurt-1.oraclecloudapps.com/ords/financial/accounts/
203
+ Content-Type: application/json
204
+ {
205
+ "account_id": "A123",
206
+ "account_name": "My Account",
207
+ "account_type": "checking",
208
+ "customer_id": "C456",
209
+ "account_opened_date": "2024-06-11",
210
+ "account_other_details": "details",
211
+ "account_balance": 1000
212
+ }
213
+ ` }
214
+ </ code >
215
+ </ CodePanel >
216
+
171
217
{ /* Account Data Table */ }
172
218
< h3 > Account Data</ h3 >
173
219
{ loading ? (
0 commit comments